<!-- DM推荐 -->
<template>
  <select-com :types="types" @selectRes="selectRes"></select-com>
  <dm-list :list="list"></dm-list>
</template>
<script>
import selectCom from "@/components/selectCom.vue";
import dmList from "@/components/dmList.vue";
import Api from "@/api";

export default {
  components: {
    selectCom,
    dmList,
  },
  data() {
    return {
      types: [
        {
          paramsName: "gender",
          title: "性别筛选",
          tpls: ["男", "女", "不限"],
          curTp: "不限",
          dropdown: false,
        },
        {
          paramsName: "level",
          title: "开场数量",
          tpls: ["男", "女", "不限", "22"],
          curTp: "22",
          dropdown: false,
        },
      ],
      list: [],
    };
  },
  methods: {
    selectRes(res) {
      console.log(res);
    },
    async login() {
      let { data } = await Api.getAllDmList();
      console.log(data);
      this.list = data.data;
    },
  },
  created() {
    this.login();
  },
};
</script>
<style lang="less" scoped>
.dmList {
  height: 6.5rem;
  overflow: auto;
}
</style>
